package com.badibadi.mail;

import com.badibadi.mytools.Utils;
import com.badibadi.uniclubber.R;
import com.badibadi.uniclubber.R.layout;
import com.badibadi.uniclubber.R.menu;

import android.os.Bundle;
import android.app.Activity;
import android.app.AlertDialog;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
/**
 * 十一、问方看到的，问方对答方第一次回答不满意,并且已过期----图38 ： $num=6 && $is_pleased='0' && $dissatisfied_reason!='' && $sender_rank='asker' && (当前时间>$pass_time)-----进入系统自动退款操作
     *       答方看到的，问方对答方第一次回答不满意,并且已过期----图39 ：$num=6 && $is_pleased='0' && $dissatisfied_reason!='' && $sender_rank='asker' && (当前时间>$pass_time)-----进入系统自动退款操作
 * 
 * 问方：对答方的回答不满意
 * 答方:没有在规定的时间内给问方一个回答（交易终止，答方逾期，退款给问方）
 *                              
 * @author Administrator
 */
public class Mail38_39Activity extends Mail245Activity {
	AlertDialog al_delete;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
//		setContentView(R.layout.activity_mail38_39);
	}


	@Override
	protected void DongTaiPeiZhi() {
		// TODO Auto-generated method stub
		TextView title_mail=(TextView)this.findViewById(R.id.title_mail);
		title_mail.setText(getResources().getString(R.string.wx_reply_zhanneixin));
		
		
		
		TextView tishi=(TextView)this.findViewById(R.id.tishi);
		tishi.setText(getResources().getString(R.string.wx_kuikuan_yuqi_kuohao));
		tishi.setVisibility(View.VISIBLE);
		this.findViewById(R.id.delete).setVisibility(View.VISIBLE);
		if(rank.equals("answerer"))//答方
		{
			Button shedingzhixunfei=(Button)this.findViewById(R.id.shedingzhixunfei);
			shedingzhixunfei.setText(getResources().getString(R.string.wx_tuikuan_reason));
			shedingzhixunfei.setVisibility(View.VISIBLE);
			shedingzhixunfei.setOnClickListener(new View.OnClickListener() {
				
				@Override
				public void onClick(View v) {
					// TODO Auto-generated method stub
					LayoutInflater inflater=LayoutInflater.from(Mail38_39Activity.this);
		            View view=inflater.inflate(R.layout.tuikuanchenggong39, null);
					
		            TextView refund_time=(TextView)view.findViewById(R.id.refund_time);
		            refund_time.setText(""+payUserContactShow1Model.getRefund_time());
		            
		             al_delete= new AlertDialog.Builder(Mail38_39Activity.this).setView(view).show();
			
				
				
				}
			});
		}else//问方
		{
			
			Button shedingzhixunfei=(Button)this.findViewById(R.id.shedingzhixunfei);
			shedingzhixunfei.setText(getResources().getString(R.string.wx_tuikuan_reason));
			shedingzhixunfei.setVisibility(View.VISIBLE);
shedingzhixunfei.setOnClickListener(new View.OnClickListener() {
				
				@Override
				public void onClick(View v) {
					// TODO Auto-generated method stub
					LayoutInflater inflater=LayoutInflater.from(Mail38_39Activity.this);
		            View view=inflater.inflate(R.layout.tuikuanchenggong38, null);
		            
		            //支付宝手续费
					  TextView alipay_charge=(TextView)view.findViewById(R.id.alipay_charge);
					  alipay_charge.setText(""+payUserContactShow1Model.getAlipay_charge());
		            
		            TextView refund_time=(TextView)view.findViewById(R.id.refund_time);
		            refund_time.setText(""+payUserContactShow1Model.getRefund_time());
		            
		             al_delete= new AlertDialog.Builder(Mail38_39Activity.this).setView(view).show();
				}
			});
		}
		
		
	
		
	}
}
